﻿using HttpContent = Microsoft.AspNetCore.Http.HttpContext;
using Anley.DomainDrivenDesign.Contract.DependencyInjection;

namespace Anley.DomainDrivenDesign.Contract.Helper;

/// <summary>
/// 主机帮助接口
/// </summary>
public interface IHostHelper
    : ISingletonAutoInject
{
    /// <summary>
    /// 获取客户端IP
    /// </summary>
    /// <param name="httpContext"></param>
    string? GetClientIp(
        HttpContent httpContext);

    /// <summary>
    /// 获取IP地区
    /// </summary>
    /// <param name="ip"></param>
    string? GetIpRegion(
        string ip);
}